<?php
    if(C('LAYOUT_ON')) {
        echo '{__NOLAYOUT__}';
    }
?>
    <!DOCTYPE html>
    <html>

    <head>
        <title> 页面自动中...跳转 等待时间：
            <?php echo($waitSecond); ?>
        </title>
        <link rel="stylesheet" type="text/css" href="__PUBLIC__/bootstrap/css/bootstrap.min.css">
        <script src="__PUBLIC__/Jquery/jquery.min.js"></script>
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    </head>

    <body>
        <div class="modal fade in" id="myModal">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button data-dismiss="modal" class="close" type="button"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
                        <h4 class="modal-title"><?php echo($message); ?><?php echo($error); ?></h4>
                    </div>
                    <div class="modal-body">
                        <?php if(isset($message)) {?>
                        <div class="alert alert-success" role="alert">:)&nbsp;
                            <?php echo($message); ?> 页面自动 <a id="href" href="<?php echo($jumpUrl); ?>">跳转</a> 等待时间： <b id="wait"><?php echo($waitSecond); ?>
                        </div>
                        <?php }else{?>
                        <div class="alert alert-danger" role="alert">:(&nbsp;
                            <?php echo($error); ?> 页面自动 <a id="href" href="<?php echo($jumpUrl); ?>">跳转</a> 等待时间： <b id="wait"><?php echo($waitSecond); ?>
                        </div>
                        <?php }?>
                        <p class="detail" style='display:none'></p>
                       
                    </div>
                    <div class="modal-footer">
                        <button data-dismiss="modal" class="btn btn-default" type="button">关闭</button>
                        <button class="btn btn-primary" id='success' type="button">确定</button>
                    </div>
                </div>
                <!-- /.modal-content -->
            </div>
            <!-- /.modal-dialog -->
        </div>
        <script src="__PUBLIC__/bootstrap/js/bootstrap.min.js"></script>
        <script type="text/javascript">
        $(function() {
        	var jumpurl = "<?php echo($jumpUrl); ?>";
            $('#myModal').modal({
                keyboard: true
            });
            $('#myModal').on('hidden.bs.modal', function (e) {
            	window.location.href=jumpurl;
            	return false;
          });
            $('#success').click(function(){
            	window.location.href=jumpurl;
            	return false;
            });
        });
        </script>
    </body>

    </html>
<script type="text/javascript">
(function(){
var wait = document.getElementById('wait'),href = document.getElementById('href').href;
var interval = setInterval(function(){
	var time = --wait.innerHTML;
	if(time <= 0) {
		location.href = href;
		clearInterval(interval);
	};
}, 1000);
})();
</script>
